﻿using PersistLayer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersistLayer.DAL
{
	public class CurrencyDAL
	{
		private Entities Entity;

		public CurrencyDAL()
		{
			Entity = new Entities();
		}

		public List<Currency> Listar()
		{
			return Entity.Currency.ToList();
		}

		public Currency Obter(int ID)
		{
			return Entity.Currency.Where(a => a.ID == ID).SingleOrDefault();
		}

		public Currency ObterPorSigla(string sigla)
		{
			return Entity.Currency.Where(a => a.Sigla == sigla).SingleOrDefault();
		}
	}
}